From 38af74e772e841ac96bfab1b737dc4506ce49e89 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Sun, 4 May 2025 02:39:34 -0700
Subject: fix(badges): Ignore empty user-set time

---
 src/routes/user/[user]/badges/+page.svelte | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/routes/user/[user]/badges/+page.svelte')

diff --git a/src/routes/user/[user]/badges/+page.svelte b/src/routes/user/[user]/badges/+page.svelte
index fa01707f..9fca60b2 100644
--- a/src/routes/user/[user]/badges/+page.svelte
+++ b/src/routes/user/[user]/badges/+page.svelte
@@ -262,7 +262,7 @@
         post: activityURL.value || '#',
         description: description.value,
         category: category.value,
-        time: inputTimeToDatabaseTime(new Date(time.value)),
+        time: time.value ? inputTimeToDatabaseTime(new Date(time.value)) : undefined,
         hidden: hidden.value === 'Hidden',
         source: source.value,
         designer: designer.value
-- 
cgit v1.2.3

